fix: prevent mass loss for supercritical fluids in liquid remover - #1715
Open
olelod wants to merge 1 commit into
Open
fix: prevent mass loss for supercritical fluids in liquid remover#1715olelod wants to merge 1 commit into
olelod wants to merge 1 commit into
Conversation
olelod
force-pushed
the
fix/liquid-remover-supercritical-guard
branch
from
August 12, 2026 18:08
f53ecfa to
b4d7289
Compare
olelod
force-pushed
the
fix/liquid-remover-supercritical-guard
branch
from
August 12, 2026 18:09
b4d7289 to
667945a
Compare
jsolaas
approved these changes
Aug 13, 2026
jsolaas
approved these changes
Aug 13, 2026
jsolaas
left a comment
Contributor
There was a problem hiding this comment.
Link to issue/discussion?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NeqSim's flash mislabels supercritical CO₂ as liquid (
vapor_fraction=0). The LiquidRemover then discards 100% of mass.This happens e.g. in CO₂ injection compressor trains when intercooled stage pressures exceed a temperature-dependent threshold (e.g. ~74 bar at 31°C, ~290 bar at 35°C, ~560 bar at 80°C).
Fix: When
vapor_fraction ≤ 0.0001, compute the EoS critical point (criticalPointFlash, cached per composition). If the stream is above it — supercritical, pass through unchanged. If below — genuinely liquid, raiseNoGasPhaseErrorto avoid infinite anti-surge recirculation.Closes equinor/ecalc-internal#2107
Discussion: equinor/ecalc-internal#2102